package org.ghost.consul.common.response;

import java.io.Serializable;

/**
 * Created by liuyang on 17-10-24.
 */
public class HttpRspDTO implements Serializable {
    private Boolean success;
    private String code;
    private String message;
    private Object data;

    public HttpRspDTO() {
        //
    }

    public HttpRspDTO(Boolean success, Object data) {
        this(success, "S200000", "操作成功", data);
    }

    public HttpRspDTO(Boolean success, String code, String message) {
        this(success, code, message, null);
    }

    public HttpRspDTO(Boolean success, String code, String message, Object data) {
        this.success = success;
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "HttpRspDTO{" +
                "success=" + success +
                ", code='" + code + '\'' +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
